package com.ruoyi.gams.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gams.mapper.GamsScoringConfigMapper;
import com.ruoyi.gams.domain.GamsScoringConfig;
import com.ruoyi.gams.service.IGamsScoringConfigService;

/**
 * 评分设置Service业务层处理
 *
 * @author ruoyi
 * @date 2021-09-03
 */
@Service
public class GamsScoringConfigServiceImpl implements IGamsScoringConfigService
{
    @Autowired
    private GamsScoringConfigMapper gamsScoringConfigMapper;

    /**
     * 查询评分设置
     *
     * @param id 评分设置主键
     * @return 评分设置
     */
    @Override
    public GamsScoringConfig selectGamsScoringConfigById(Integer id)
    {
        return gamsScoringConfigMapper.selectGamsScoringConfigById(id);
    }

    /**
     * 查询评分设置列表
     *
     * @param gamsScoringConfig 评分设置
     * @return 评分设置
     */
    @Override
    public List<GamsScoringConfig> selectGamsScoringConfigList(GamsScoringConfig gamsScoringConfig)
    {
        return gamsScoringConfigMapper.selectGamsScoringConfigList(gamsScoringConfig);
    }

    /**
     * 新增评分设置
     *
     * @param gamsScoringConfig 评分设置
     * @return 结果
     */
    @Override
    public int insertGamsScoringConfig(GamsScoringConfig gamsScoringConfig)
    {
        gamsScoringConfig.setCreateTime(DateUtils.getNowDate());
        return gamsScoringConfigMapper.insertGamsScoringConfig(gamsScoringConfig);
    }

    /**
     * 修改评分设置
     *
     * @param gamsScoringConfig 评分设置
     * @return 结果
     */
    @Override
    public int updateGamsScoringConfig(GamsScoringConfig gamsScoringConfig)
    {
        return gamsScoringConfigMapper.updateGamsScoringConfig(gamsScoringConfig);
    }

    /**
     * 批量删除评分设置
     *
     * @param ids 需要删除的评分设置主键
     * @return 结果
     */
    @Override
    public int deleteGamsScoringConfigByIds(Integer[] ids)
    {
        return gamsScoringConfigMapper.deleteGamsScoringConfigByIds(ids);
    }

    /**
     * 删除评分设置信息
     *
     * @param id 评分设置主键
     * @return 结果
     */
    @Override
    public int deleteGamsScoringConfigById(Integer id)
    {
        return gamsScoringConfigMapper.deleteGamsScoringConfigById(id);
    }
}
